<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
 <%--  <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> --%>


  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script type="text/javascript">
  	$(document).ready(function(){
  		$("#messageForm").submit(function(){
  			alert("쪽지가 ${requestScope.ivo.memberId } 님께  전송되었습니다");
  			
  		});
  		$(":input[name=backBtn]").click(function(){
  			location.href="${initParam.root}item/showItemContent.moja?itemNo=+${requestScope.ivo.itemNo }";
  		});
  	});
  </script>

 
<div id="mainCss" align="center">

	<form id="messageForm" method="post" action="${initParam.root }item/sendMessage.moja">
	<input type="hidden" name="itemNo" value="${requestScope.ivo.itemNo }">
	<table border width="300" >
		
		<tr>
			<th bgcolor="liteblue"> 받는사람</th>
			<td colspan=4>
				<input type="text" name="memberId" value="${requestScope.ivo.memberId }" readonly="readonly">
			 </td>
		</tr>

		<tr>
			<th bgcolor="liteblue"> 제목</th>
			<td> <input type ="text" name ="messageTitle" size="20" ></td>
		
		<tr>
			<td colspan=4 align="center">
			
				<textarea  cols="30" rows="10" name="messageContent"> </textarea>
			</td>
		</tr>
	
	</table>
	<table width="300">
		<th>
			<input type="reset" value="다시 쓰기"/>
			<input type ="submit" value="보내기" />
			<input type ="button" name="backBtn" value="취소" />
			
	
		</th>
	</table>	
</form>
</div>
